Skip to main content

Get Started with Sveltekit

Start with cloned repository

To get started with project's frontend, if you have cloned the repository, navigate to the frontend directory:

cd frontend

and run the command:

 npm install
## Creating a project

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app directory
npm create svelte@latest my-app

Then just follow the prompts.

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Create sveltekit project programatically

create-svelte's Github page.

You can also use create-svelte programmatically:

import { create } from 'create-svelte';
await create('my-new-app', {
name: 'my-new-app',
template: 'default', // or 'skeleton' or 'skeletonlib'
types: 'checkjs', // or 'typescript' or null;
prettier: false,
eslint: false,
playwright: false,
vitest: false
});

checkjs means your project will use TypeScript to typecheck JavaScript via JSDoc comments.